﻿@model VNWIKI_WEB.Models.DataList
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section categoryList {

    @{foreach (var pt in Model.CatList)
      { 
      <li>
        <a href="@Url.Action("GetAlbumList", "Home", new {catID = pt.ID })">@pt.Name</a>
      </li>
    } }

}

@section content {

                <div class="slider">
                	<div class="border"> 
                        <div class="info">
                            <h2>Upload Ảnh</h2>
                        </div>
                        <div class="views">
                        <div style="width:80%;">
		                                       <input id="file_upload" name="file_upload" type="file" multiple="true" />
                                               <input type="button" value="Begin Upload" id="uploadButton" onclick="BeginUpload();" />
                                               <script type="text/javascript">
                                                   $(function () {
                                                       $('#file_upload').uploadify({
                                                           'uploader': '../Library/uploadify2.4/uploadify.swf',
                                                           'script': '@Url.Action("ReceiveFileUpload","Upload")',
                                                           'cancelImg': '../Library/uploadify2.4/cancel.png',
                                                           'auto': false,
                                                           'multi': true,
                                                           'fileDataName': 'MyFile',
                                                           'onAllComplete': function (event, data) { MyUploadCompleted(event, data); },
                                                           'onComplete': function (event, ID, fileObj, response, data) { MyUploadComleted(event, ID, fileObj, response, data); },
                                                           'scriptData': { 'sessionId': '@ViewData["sessionId"]' }


                                                       });
                                                   });
                                                   function BeginUpload() {
                                                       $('#file_upload').uploadifyUpload();
                                                   }
                                                   function MyUploadCompleted(event, data) {
                                                       alert('Upload all successful!');
                                                   }
                                                   function MyUploadComleted(event, ID, fileObj, response, data) {
                                                       if (response == '1')
                                                           alert('Upload successful!');
                                                       else
                                                           alert('Upload successful!');
                                                   }
                                               </script>
                               </div>
                            <div style="width:80%;">
                           <form action=""  method="post" id="signupForm">

                                    <table class="signup">
                                         <tr>
                                            <td style="width:15%"><span>Tên Album ảnh:</span></td><td><input class="input" type="text" id="signInName" name="accName" /></td>
                                          </tr>
                                         <tr>
                                            <td><span>Thể loại:</span></td><td><input class="input" type="text" id="pass" name="password" /></td>
                                          </tr>
                                          <tr>
                                            <td><span>Từ khóa:</span></td><td><input class="input" type="text" id="rePass" name="rePassword" /></td>
                                          </tr>
                                          <tr>
                                            <td colspan="2">
                                                <input class="red no" type="button" value="Hủy bỏ" /> 
                                                <input class="blue" id="" type="button" value="Bắt đầu" onclick="BeginUpload();" /> 
                                            </td>
                                          </tr>
                                          
                                    </table>       
                               
                                </form>
                                </div>
                                
                        </div>
                    </div>
                    </div>
             
                <div class="album-list">
                     
                </div>
                <div id="fb-root"></div>
        <script>
            (function (d, s, id) {
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) return;
                js = d.createElement(s); js.id = id;
                js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
                fjs.parentNode.insertBefore(js, fjs);
            } (document, 'script', 'facebook-jssdk'));
        </script>

}

